Skip to content

Programmatic imports#359

Merged
benvanwerkhoven merged 4 commits into
masterfrom
programmatic_imports
May 27, 2026
Merged

Programmatic imports#359
benvanwerkhoven merged 4 commits into
masterfrom
programmatic_imports

Conversation

@benvanwerkhoven
Copy link
Copy Markdown
Collaborator

Fixes #292.

This cuts import kernel_tuner import time from about 2.78 s down to about 1.34 s, an improvement of roughly 1.44 s (~52%) on my laptop machine. There is a lot of variance in the measurements of import times however so the impact might not always be this large. But overall, I think the changes to the code are worth it in terms of time saving. Running a quick test is also noticeably faster.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Feb 3, 2026

@sonarqubecloud
Copy link
Copy Markdown

@benvanwerkhoven
Copy link
Copy Markdown
Collaborator Author

I just learned that Python 3.15 has language support for lazy imports. However, it will be a while before version 3.15 will be our minimum required version. So I propose we go with this direction for now and move to using language supported lazy imports later.

@stijnh stijnh self-assigned this May 27, 2026
@stijnh stijnh self-requested a review May 27, 2026 10:03
Copy link
Copy Markdown
Member

@stijnh stijnh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@benvanwerkhoven benvanwerkhoven merged commit 6c2adc2 into master May 27, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Programmatic imports of strategies and backends

2 participants